import 'package:boss/ui/widget/center_title_app_bar.dart';
import 'package:hi_common/hi_common.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:router/annotation.dart';

import 'provider/analysis_provider.dart';
import 'widget/analysis_browser.dart';

@RouterConfig(AnalysisPage.pageName)
class AnalysisPage extends StatefulWidget {
  static const String pageName = '/analysisPage';

  @override
  _AnalysisPageState createState() => _AnalysisPageState('数据面板');
}

class _AnalysisPageState extends BaseState<AnalysisPage> {
  _AnalysisPageState(String pageName) : super(pageName);

  @override
  Widget build(BuildContext context) {
    ScreenUtil(width: 750, height: 1334).init(context);

    return ChangeNotifierProvider(
      create: (_) => AnalysisProvider(),
      child: Scaffold(
        appBar: CenterTitleAppBar(title: super.pageName),
        body: AnalysisBrowser(),
      ),
    );
  }
}
